import matplotlib.pyplot as plt
import pandas as pd

df = pd.read_excel('营销和产品销量表.xlsx', index_col=0)
plt.rcParams['font.sans-serif'] = 'SimHei'
plt.rcParams['figure.figsize'] = (8, 5)
x = df['展现量']
y1 = df['点击量']
plt.subplot(2, 2, 1)
plt.scatter(x, y1)
plt.legend(('展现量与点击量',), loc='lower right')
y2 = df['订单金额']
plt.subplot(2, 2, 2)
plt.scatter(x, y2, s=20, c='r', marker='*')
plt.legend(('展现量与订单金额',), loc='lower right')
y3 = df['加购数']
plt.subplot(2, 2, 3)
plt.scatter(x, y3, s=25, c='g', marker='d')
plt.legend(('展现量与加购数',), loc='lower right')
y4 = df['下单新客数']
plt.subplot(2, 2, 4)
plt.scatter(x, y4, s=30, c='b', marker='+')
plt.legend(('展现量与下单新客数',), loc='lower right')
plt.show()
